package cn.lanca.gof6_10._06proxy.case2.real_subject;

import com.example.demo.gof6_10._06proxy.case2.abstract_subject.Specialty;

import javax.swing.*;
import java.awt.*;

/**
 * 真实主题：婺源特产
 *
 * @author meihongliang
 * @since 2020/8/10 14:41
 */
public class WySpecialty extends JFrame implements Specialty {

    private static final long serialVersionUID = 1L;

    public WySpecialty() {
        super("韶关代理婺源特产测试");
        this.setLayout(new GridLayout(1, 1));
        JLabel l1 = new JLabel(new ImageIcon("src/main/java/com/example/demo/gof6_10/_06proxy/case2/WuyuanSpecialty.jpg"));
        this.add(l1);
        this.pack();
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    /**
     * setVisible(true);
     */
    @Override
    public void display() {
        System.out.println("韶关代理婺源特产display()");
        this.setVisible(true);
    }
}
